<?php
$Galleries = $this->Galleries;
?>
<?php $this->placeholder('toolBar')->captureStart();?>
<a href="<? echo $this->baseUrl('gallery/edit/add')  ?>" class="button" >Добавить</a>
<?php $this->placeholder('toolBar')->captureEnd();?>


<style>
.galleryDashboard div img
{
	padding: 10px;
	margin: 10px;
	border: 1px solid #E4E8F1
}
.galleryDashboard div
{
	cursor:pointer;
	padding: 5px;
	margin: 10px; 
	width: 100px;
	height: 100px;
	float: left;
	text-align: center;
}
</style>


<div class="galleryDashboard">
<?php
foreach ($Galleries as $Item)
{
    $Link  = $this->baseUrl("gallery/edit/edit/id/" . $Item['id']);    
?>

<div>
<?php 
if (isset($Item['pictures'][0]))
{
?>
	<a href="<?=$Link; ?>"><img width="50" height="50" src="<?php echo $this->baseUrl('images/thumb_small/' . $Item['pictures'][0]['filename'])?>" /></a>
<?php 
}
?>
	    
<!--<a href="<?php echo $this->baseUrl("gallery/edit/delete/id/". $Item['id'])?>">Удалить</a>-->

<a href="<?=$Link;?>"><?php echo $Item['Name']?></a>
</div>

<?php 
}
?>
</div>
<div style="clear: both;"></div>
